<ion-header>
  <ion-navbar>
    <button ion-button menuToggle>
      <ion-icon name="menu"></ion-icon>
    </button>
    <ion-title>我的购买</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
  <section *ngIf="data == 0" class="null">

    <div>
      <img src="./assets/imgs/nothing.png" alt="">
    </div>
    <span>
      您好,目前还没有相关的订单~
    </span>
  </section>

	<section *ngIf="data == 1" class="order-info">
		<ion-list>
			<div class="order" *ngFor="let item of list">
				<div class="state-title">
					<span>{{item.add_time}}</span>
					<span>{{item.order_state}}</span>
				</div>
				<div class="goods-info">
					<div class="goods-img">
						<div class="goods-img-border">
						<img src="{{item.goods_image}}" alt="">								
						</div>
					</div>
					<div class="goods-title">
						<div class="title">
							<span>{{item.goods_name}}</span>
						</div>
						<div class="price">
							<div class="price-double">
								<span>￥{{item.all_price}}</span>
								<span>￥{{item.goods_price}}</span>
							</div>
							<div class="quantity">
								<span>X{{item.goods_num}}</span>
							</div>
						</div>
					</div>
				</div>
				<div class="order-id">
					<span>订单编号:{{item.order_sn}}</span>
					<span class="all-in-all">合计:￥{{item.total_price}}</span>
				</div>
				<div class="divide"></div>
			</div>
		</ion-list>

		<ion-infinite-scroll (ionInfinite)="doInfinite($event)" threshold="1%" *ngIf="loadComplate == '0'">
			<ion-infinite-scroll-content
			loadingSpinner="bubbles"
			loadingText="正在加载...">
			</ion-infinite-scroll-content>
		</ion-infinite-scroll>
		<div *ngIf="loadComplate == '1'" class="load-c">
			<span>已加载全部</span>
		</div>
	</section>

</ion-content>